<div class="container wenku-main">
    <div class="row">
        <div class="col-xs-9 wenku-left wenku-nopadding">

            <div class="panel panel-default wenku-noborder">
                <div class="panel-body">
                    <h1><img alt="{{.Doc.Ext}}文档" src="/static/Home/default/img/{{.Doc.ExtCate}}_24.png"/> {{.Doc.Title}}</h1>
                    <div class="help-block wenku-doc-info">
							<span>
								<a href="/list/{{.CrumbChanel.Alias}}" title="{{.CrumbChanel.Title}}">{{.CrumbChanel.Title}}</a> >
								<a href="/list/{{.CrumbChanel.Alias}}/pid/{{.CrumbParent.Id}}" title="{{.CrumbParent.Title}}">{{.CrumbParent.Title}}</a> >
								<a href="/list/{{.CrumbChanel.Alias}}/pid/{{.CrumbParent.Id}}/cid/{{.CrumbChildren.Id}}" title="{{.CrumbChildren.Title}}">{{.CrumbChildren.Title}}</a> >
								<span class="text-muted">文档预览</span>
							</span>
                        <div class="pull-right text-muted">
                            <span title="页数"><i class="fa fa-file-text-o"></i> {{HandlePageNum .Doc.Page}} 页</span>
                            <span title="下载"><i class="fa fa-download"></i> {{.Doc.Dcnt}} 下载</span>
                            <span title="浏览"><i class="fa fa-eye"></i> {{.Doc.Vcnt}} 浏览</span>
                            <span title="评论"><i class="fa fa-comments-o"></i> {{.Doc.ScorePeople}} 评论</span>
                            <span title="收藏"><i class="fa fa-heart-o"></i> {{.Doc.Ccnt}} 收藏</span>
                            <span title="评分"><i class="wenku-star star-{{StarVal (Interface2Int .Doc.Score) false}}"></i> {{StarVal (Interface2Int .Doc.Score) true}}分</span>
                        </div>
                    </div>

                    <div class="help-block wenku-preview-tips">温馨提示：如果当前文档出现乱码或未能正常浏览，请先下载原文档进行浏览。</div>

                    <div class="wenku-viewer" id="wenku-viewer" data-scale="9">
                        {{range $index,$el:=.PreviewPages}}
                            {{if gt $index 1}}
                            <img src="/static/Common/img/loading.gif" data-original="{{$.PreviewDomain}}/{{Xmd5 $.Doc.Md5}}/{{CalcInt $index "+" 1}}.{{Default $.Doc.PreviewExt "svg"}}" class="wenku-lazy wenku-viewer-img wenku-page{{CalcInt $index "+" 1}}" data-page="{{CalcInt $index "+" 1}}" alt="{{$.Doc.Title}} 第 {{CalcInt $index "+" 1}} 页">
                            {{else}}
                            <img src="{{$.PreviewDomain}}/{{Xmd5 $.Doc.Md5}}/{{CalcInt $index "+" 1}}.{{Default $.Doc.PreviewExt "svg"}}" class="wenku-lazy wenku-viewer-img wenku-page{{CalcInt $index "+" 1}}" data-page="{{CalcInt $index "+" 1}}" alt="{{$.Doc.Title}} 第 {{CalcInt $index "+" 1}} 页">
                            {{end}}
                        {{end}}

                        {{if gt $.TotalPages $.PageShow}}
                        <div class="wenku-viewer-more text-center" data-next="{{CalcInt $.PageShow "+" 1}}" data-ext="{{Default $.Doc.PreviewExt "svg"}}" data-svg="{{$.PreviewDomain}}/{{Xmd5 $.Doc.Md5}}/">
                            <div>下载文档到电脑，方便使用</div>
                            <div><a href="javascript:void(0);" class="btn btn-primary" data-toggle="modal" data-target="#ModalDownload"><i class="fa fa-cloud-download"></i> 下载文档</a></div>
                            <a href="javascript:void(0);" class="wenku-viewer-more-btn"><div class="help-block">还有 <span class="wenku-unread-pages">{{CalcInt $.TotalPages "-" $.PageShow}}</span> 页未阅读，<span class="text-primary">继续阅读</span></div></a>
                            <div class="help-block"><a href="javascript:void(0);" class="wenku-viewer-more-btn"><i class="fa fa-angle-down"></i></a></div>
                        </div>
                        {{end}}
                    </div>



                    <div class="help-block">
                        <span>本文档由 <a href="/user/{{.Doc.Uid}}" target="_blank"title="{{.Doc.Username}}">{{.Doc.Username}}</a> 于 <span class="text-muted">{{TimestampFormat (Interface2Int .Doc.TimeCreate)}}</span>上传分享</span>
                    </div>
                    <div class="help-block">
                        <div class="pull-left">
                            <a href="javascript:void(0);" data-toggle="modal" data-target="#ModalReport" class="btn btn-primary btn-sm"><i class="fa fa-warning"></i> 举报</a>
                        </div>
                        <div class="pull-right wenku-mgl-15px">
                            <a href="javascript:void(0);" rel="nofollow" data-toggle="modal" data-target="#ModalDownload" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-cloud-download"></i> 下载原文档({{FormatByte (Interface2Int .Doc.Size)}})</a>
                        </div>
                        <div class="pull-right">
                            {{if DoesCollect (Interface2Int .Doc.Id) .LoginUid}}
                            <a href="javascript:void(0);" rel="nofollow" class="btn btn-primary btn-sm wenku-collect disabled"><i class="fa fa-heart-o"></i> <span>已收藏</span></a>
                            {{else}}
                            <a href="javascript:void(0);" rel="nofollow" class="btn btn-primary btn-sm wenku-collect"><i class="fa fa-heart-o"></i>  <span>收藏</span></a>
                            {{end}}
                            <a href="javascript:void(0);" data-toggle="modal" data-target="#ModalShare" class="btn btn-primary btn-sm"><i class="fa fa-share-alt"></i> 分享</a>
                        </div>
                    </div>


                </div>
            </div>

            <!--评分评论-->
            {{template "Comment" .}}

        </div>
        <div class="col-xs-3 wenku-right">



            <div class="panel panel-default wenku-noborder wenku-maylike">
                <div class="panel-heading">
                    <div class="strong">热门文档</div>
                </div>
                <div class="panel-body">

                    <ul class="wenku-tabs-list">
                        {{range .Hots}}
                        <li><img alt="{{.Ext}}文档" src="/static/Home/default/img/{{.ExtCate}}_24.png"/><a href="/view/{{.Id}}" target="_blank" title="{{.Title}}">{{.Title}}</a></li>
                        {{end}}
                    </ul>
                </div>
            </div>


            <div class="panel panel-default wenku-noborder wenku-maylike">
                <div class="panel-heading">
                    <div class="strong">最新文档</div>
                </div>
                <div class="panel-body">

                    <ul class="wenku-tabs-list">
                        {{range .News}}
                        <li><img alt="{{.Ext}}文档" src="/static/Home/default/img/{{.ExtCate}}_24.png"/><a href="/view/{{.Id}}" target="_blank" title="{{.Title}}">{{.Title}}</a></li>
                        {{end}}
                    </ul>

                </div>
            </div>

        </div>
    </div>


</div>


<div class="container-fluid navbar-default navbar-fixed-bottom" role="navigation">
    <div class="container">
        <div class="row">
            <div class="col-xs-9">
                <ul class="nav navbar-nav">
                    <li><a href="javascript:void(0);" class="wenku-expend"><i class="fa fa-arrows-alt em14"></i>&nbsp;</a></a></li>


                    <li><a href="javascript:void(0);" data-toggle="modal" data-target="#ModalShare"><i class="fa fa-share-alt em14"></i>&nbsp;</a></li>
                    <li><a href="javascript:void(0);" class="wenku-collect"><i class="fa fa-heart-o em14"></i>&nbsp;</a></li>
                    <li class="hidden-xs"><a href="javascript:void(0);" class="wenku-scale-minus"><i class="fa fa-search-minus em14"></i>&nbsp;</a></li>
                    <li class="hidden-xs"><a href="javascript:void(0);" class="wenku-scale-plus"><i class="fa fa-search-plus em14"></i>&nbsp;</a></li>



                    <li class="wenku-mgl-15px"><a href="javascript:void(0);" class="wenku-page-prev"><i class="fa fa-chevron-up em14"></i></a></li>
                    <p class="navbar-text"> <span class="wenku-current-page">1</span> / <span class="wenku-total-page">{{HandlePageNum .Doc.Page}}</span> </p>
                    <li class="wenku-mgr-15px"><a href="javascript:void(0);" class="wenku-page-next"><i class="fa fa-chevron-down em14"></i></a></li>



                    <li><a href="javascript:void(0);" class="wenku-goto-comment"><i class="fa fa-comments-o em14"></i> 评价文档</a></li>

                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <p class="navbar-text"><i class="fa fa-database"></i>&nbsp;&nbsp;{{.Doc.Price}}&nbsp;&nbsp;个金币 </p>
                    <li class="active" data-toggle="modal" data-target="#ModalDownload"><a href="javascript:void(0);"><i class="fa fa-cloud-download em14"></i> 下载文档({{FormatByte (Interface2Int .Doc.Size)}})</a></li>
                </ul>
            </div>
            <div class="col-xs-3">
                <ul class="nav navbar-nav navbar-right wenku-up-to-top">
                    <li class="active go-top"><a href="javascript:void(0);"><i class="fa fa-arrow-up em14"></i> 回到顶部</a></li>
                </ul>
            </div>
        </div>
    </div>
</div>


{{template "ModalDownload" .}}
{{template "ModalShare" .}}
{{template "ModalReport" .}}
{{template "ModalCollect" .}}